<!DOCTYPE html>
<html>
<head>
<?php
    $conn = mysql_connect("localhost", "root","123456") or die("Ket noi den MySQL that bai");
    mysql_select_db("mp3", $conn);
    mysql_query("SET NAMES UTF8",$conn); 
    $id=$_GET["id"];
    $idcs=$_GET["idcs"];    
    $sql = "select * from album where id_album=".$id;    
    $q = mysql_query($sql);
    $row = mysql_fetch_array($q);
    $tenab=$row["tenalbum"];
?>
<title><?=$tenab?></title>
<link rel="stylesheet" type="text/css" href="css/chitiet-page.css" />
<link rel="stylesheet" type="text/css" href="engine1/style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<meta name="keywords" content="WOW Slider, Wordpress Gallery Slider, Wordpress Photo Slider" />
<meta name="description" content="WOWSlider created with WOW Slider, a free wizard program that helps you easily generate beautiful web slideshow" />
<script language="javascript" type="text/javascript" src="engine1/jquery.js"></script>
</head>
<?php include_once('master_menu.php');?>
<div class="page">
  <div class="musicpage">
        <div class="conten-title" >
        <h2>
        <a class="#"><?=$tenab?></a> - 
        <a href="artist_page.php?id=<?=$id?>"><?=$tencs?></a>
        </h2>   
        </div>
        
        <p class="song-info">
            Album: <a href="#"><?=$tenab?></a>| Lượt nghe: 
        </p>
        
        <div class="music-flas">
        <?php if (isset($_GET["title"]))
        {
            ?>
              <embed style="width:600px; height:75px;" src="<?=$_GET["title"]?>"/>
          <?php } ?>    
        </div>
        
        <div class="album_ct">
            <?php 
                $sql = "select * from `music` m,`album_music` am,`album` a,`nghesi` n
                where m.id_music=am.id_music
                and am.id_album=a.id_album
                and a.id_nghesi=n.id_nghesi
                and am.`id_album`=" .$id. " and n.`id_nghesi`=". $idcs;
                $a = mysql_query($sql);
                while ($row= mysql_fetch_array($a))
                {
                    
                    $tenbh=$row["tenmusic"];
                    $album=$row["id_album"];
                    $id=$row["id_nghesi"];
                    $link=$row["link"];
            ?>
                <p><a href="chitietalbum.php?id=<?=$album?>&idcs=<?=$id?>&title=nhac/<?=$link?>"><?=$tenbh?></a></p><br />
            <?php
                }
            ?>
        </div>
       
        <div id="casi">
            <h2 class="content-block-title"><a href="artist_page.php?id=<?=$id?>"><?=$tencs?></a></h2>
            <div  class="singer-info-block">
			<a>
			<span class="singer-image"><img width="114px" height="108px;" src="images-nghesi/<?=$pic?>"/></span>
			</a>
			<span class="singer-site"><a href="artist_page.php?id=<?=$idcs?>">Trang cá nhân</a></span>
  

            <strong>Tên thật:	</strong><?=$tenthat?></p>
		     <strong>Quốc gia: </strong><?=$quoctich?></p>
             <strong>Ngày sinh:</strong> <?=$ngaysinh?><br/>

             </div>
                 <div class="singer-item singer-album">
	<h2 class="singer-item-title"><a href="artist_page_album.php?id=<?=$idcs?>">Album <?=$tencs?></a></h2>
               <?php
    $sql = "select * from nghesi inner join album on album.id_nghesi = nghesi.id_nghesi where nghesi.id_nghesi= ".$idcs;
    $q = mysql_query($sql);
    while ($row= mysql_fetch_array($q))
    {
        $album=$row["id_album"];
        $tenalbum=$row["tenalbum"];
        $view=$row["view"];        
        $pic=$row["pic"];
		$tenthat=$row["tenthat"];
		$quoctich=$row["quoctich"];
		$ngaysinh=$row["ngaysinh"];
		$tencs=$row["nghedanh"];
?> 
	

         <div class="content-item last-child">
			<a><img width="94" height="94" src="<?=$pic?>"></a>
			<div class="meta">
				<h3><a><?=$tenalbum?></a></h3>
				<span><a><?=$tencs?></a></span>
			</div>
		</div>

	    <?php
    }
    
?>  			
              </div>  

<?php
       
       
    mysql_close($conn);
?>   
  </div>
   </div>
  
</div>
</div>
<?php include_once('master_footer.php');?>